3.3.23 \(\int \frac {x (a+b \log (c x^n))}{(d+e x^2)^2} \, dx\) [223]

Optimal. Leaf size=50 \[ \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{2 d \left (d+e x^2\right )}-\frac {b n \log \left (d+e x^2\right )}{4 d e} \]

[Out]

1/2*x^2*(a+b*ln(c*x^n))/d/(e*x^2+d)-1/4*b*n*ln(e*x^2+d)/d/e

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2373, 266} \begin {gather*} \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{2 d \left (d+e x^2\right )}-\frac {b n \log \left (d+e x^2\right )}{4 d e} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x*(a + b*Log[c*x^n]))/(d + e*x^2)^2,x]

[Out]

(x^2*(a + b*Log[c*x^n]))/(2*d*(d + e*x^2)) - (b*n*Log[d + e*x^2])/(4*d*e)

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 2373

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_), x_Symbol] :> Simp
[(f*x)^(m + 1)*(d + e*x^r)^(q + 1)*((a + b*Log[c*x^n])/(d*f*(m + 1))), x] - Dist[b*(n/(d*(m + 1))), Int[(f*x)^
m*(d + e*x^r)^(q + 1), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, q, r}, x] && EqQ[m + r*(q + 1) + 1, 0] && NeQ[
m, -1]

Rubi steps

\begin {align*} \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{\left (d+e x^2\right )^2} \, dx &=\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{2 d \left (d+e x^2\right )}-\frac {(b n) \int \frac {x}{d+e x^2} \, dx}{2 d}\\ &=\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{2 d \left (d+e x^2\right )}-\frac {b n \log \left (d+e x^2\right )}{4 d e}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 74, normalized size = 1.48 \begin {gather*} -\frac {2 a d-2 b n \left (d+e x^2\right ) \log (x)+2 b d \log \left (c x^n\right )+b d n \log \left (d+e x^2\right )+b e n x^2 \log \left (d+e x^2\right )}{4 d e \left (d+e x^2\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x*(a + b*Log[c*x^n]))/(d + e*x^2)^2,x]

[Out]

-1/4*(2*a*d - 2*b*n*(d + e*x^2)*Log[x] + 2*b*d*Log[c*x^n] + b*d*n*Log[d + e*x^2] + b*e*n*x^2*Log[d + e*x^2])/(
d*e*(d + e*x^2))

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.12, size = 179, normalized size = 3.58

method result size
risch \(-\frac {b \ln \left (x^{n}\right )}{2 e \left (e \,x^{2}+d \right )}-\frac {-i \pi b d \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+i \pi b d \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b d \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i \pi b d \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-2 \ln \left (x \right ) b e n \,x^{2}+\ln \left (e \,x^{2}+d \right ) b e n \,x^{2}-2 \ln \left (x \right ) b d n +\ln \left (e \,x^{2}+d \right ) b d n +2 d b \ln \left (c \right )+2 a d}{4 \left (e \,x^{2}+d \right ) e d}\) \(179\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*ln(c*x^n))/(e*x^2+d)^2,x,method=_RETURNVERBOSE)

[Out]

-1/2*b/e/(e*x^2+d)*ln(x^n)-1/4*(-I*Pi*b*d*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+I*Pi*b*d*csgn(I*c)*csgn(I*c*x^n)
^2+I*Pi*b*d*csgn(I*x^n)*csgn(I*c*x^n)^2-I*Pi*b*d*csgn(I*c*x^n)^3-2*ln(x)*b*e*n*x^2+ln(e*x^2+d)*b*e*n*x^2-2*ln(
x)*b*d*n+ln(e*x^2+d)*b*d*n+2*d*b*ln(c)+2*a*d)/(e*x^2+d)/e/d

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 70, normalized size = 1.40 \begin {gather*} -\frac {1}{4} \, b n {\left (\frac {e^{\left (-1\right )} \log \left (x^{2} e + d\right )}{d} - \frac {e^{\left (-1\right )} \log \left (x^{2}\right )}{d}\right )} - \frac {b \log \left (c x^{n}\right )}{2 \, {\left (x^{2} e^{2} + d e\right )}} - \frac {a}{2 \, {\left (x^{2} e^{2} + d e\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*x^n))/(e*x^2+d)^2,x, algorithm="maxima")

[Out]

-1/4*b*n*(e^(-1)*log(x^2*e + d)/d - e^(-1)*log(x^2)/d) - 1/2*b*log(c*x^n)/(x^2*e^2 + d*e) - 1/2*a/(x^2*e^2 + d
*e)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 64, normalized size = 1.28 \begin {gather*} \frac {2 \, b n x^{2} e \log \left (x\right ) - 2 \, b d \log \left (c\right ) - 2 \, a d - {\left (b n x^{2} e + b d n\right )} \log \left (x^{2} e + d\right )}{4 \, {\left (d x^{2} e^{2} + d^{2} e\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*x^n))/(e*x^2+d)^2,x, algorithm="fricas")

[Out]

1/4*(2*b*n*x^2*e*log(x) - 2*b*d*log(c) - 2*a*d - (b*n*x^2*e + b*d*n)*log(x^2*e + d))/(d*x^2*e^2 + d^2*e)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 292 vs. \(2 (39) = 78\).
time = 27.00, size = 292, normalized size = 5.84 \begin {gather*} \begin {cases} \tilde {\infty } \left (- \frac {a}{2 x^{2}} - \frac {b n}{4 x^{2}} - \frac {b \log {\left (c x^{n} \right )}}{2 x^{2}}\right ) & \text {for}\: d = 0 \wedge e = 0 \\\frac {- \frac {a}{2 x^{2}} - \frac {b n}{4 x^{2}} - \frac {b \log {\left (c x^{n} \right )}}{2 x^{2}}}{e^{2}} & \text {for}\: d = 0 \\\frac {\frac {a x^{2}}{2} - \frac {b n x^{2}}{4} + \frac {b x^{2} \log {\left (c x^{n} \right )}}{2}}{d^{2}} & \text {for}\: e = 0 \\- \frac {2 a d}{4 d^{2} e + 4 d e^{2} x^{2}} - \frac {b d n \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{4 d^{2} e + 4 d e^{2} x^{2}} - \frac {b d n \log {\left (x + \sqrt {- \frac {d}{e}} \right )}}{4 d^{2} e + 4 d e^{2} x^{2}} - \frac {b e n x^{2} \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{4 d^{2} e + 4 d e^{2} x^{2}} - \frac {b e n x^{2} \log {\left (x + \sqrt {- \frac {d}{e}} \right )}}{4 d^{2} e + 4 d e^{2} x^{2}} + \frac {2 b e x^{2} \log {\left (c x^{n} \right )}}{4 d^{2} e + 4 d e^{2} x^{2}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*ln(c*x**n))/(e*x**2+d)**2,x)

[Out]

Piecewise((zoo*(-a/(2*x**2) - b*n/(4*x**2) - b*log(c*x**n)/(2*x**2)), Eq(d, 0) & Eq(e, 0)), ((-a/(2*x**2) - b*
n/(4*x**2) - b*log(c*x**n)/(2*x**2))/e**2, Eq(d, 0)), ((a*x**2/2 - b*n*x**2/4 + b*x**2*log(c*x**n)/2)/d**2, Eq
(e, 0)), (-2*a*d/(4*d**2*e + 4*d*e**2*x**2) - b*d*n*log(x - sqrt(-d/e))/(4*d**2*e + 4*d*e**2*x**2) - b*d*n*log
(x + sqrt(-d/e))/(4*d**2*e + 4*d*e**2*x**2) - b*e*n*x**2*log(x - sqrt(-d/e))/(4*d**2*e + 4*d*e**2*x**2) - b*e*
n*x**2*log(x + sqrt(-d/e))/(4*d**2*e + 4*d*e**2*x**2) + 2*b*e*x**2*log(c*x**n)/(4*d**2*e + 4*d*e**2*x**2), Tru
e))

________________________________________________________________________________________

Giac [A]
time = 4.74, size = 70, normalized size = 1.40 \begin {gather*} -\frac {b n x^{2} e \log \left (x^{2} e + d\right ) - 2 \, b n x^{2} e \log \left (x\right ) + b d n \log \left (x^{2} e + d\right ) + 2 \, b d \log \left (c\right ) + 2 \, a d}{4 \, {\left (d x^{2} e^{2} + d^{2} e\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*x^n))/(e*x^2+d)^2,x, algorithm="giac")

[Out]

-1/4*(b*n*x^2*e*log(x^2*e + d) - 2*b*n*x^2*e*log(x) + b*d*n*log(x^2*e + d) + 2*b*d*log(c) + 2*a*d)/(d*x^2*e^2
+ d^2*e)

________________________________________________________________________________________

Mupad [B]
time = 3.50, size = 73, normalized size = 1.46 \begin {gather*} \frac {b\,n\,\ln \left (x\right )}{2\,d\,e}-\frac {b\,\ln \left (c\,x^n\right )}{2\,\left (e^2\,x^2+d\,e\right )}-\frac {b\,n\,\ln \left (e\,x^2+d\right )}{4\,d\,e}-\frac {a}{2\,e^2\,x^2+2\,d\,e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*(a + b*log(c*x^n)))/(d + e*x^2)^2,x)

[Out]

(b*n*log(x))/(2*d*e) - (b*log(c*x^n))/(2*(d*e + e^2*x^2)) - (b*n*log(d + e*x^2))/(4*d*e) - a/(2*d*e + 2*e^2*x^
2)

________________________________________________________________________________________